<?php
/**
 * Created by PhpStorm
 * User: Jhinwy
 * Date: 5/21/24
 * Time: 3:39 PM
 */

namespace App\Models;

class WechatKfKeyword extends BaseModel
{
    protected $table = 'wechat_kf_keyword';

    protected $fillable = [
        'corp_id', 'open_kfid', 'msg_type', 'keyword', 'content'
    ];


    const MSG_TEXT        = 'text';
    const MSG_IMAGE       = 'image';
    const MSG_LINK        = 'link';
    const MSG_MINIPROGRAM = 'miniprogram';


    public static function getMsgTypeMapping()
    {
        return [
            [
                'id'    => self::MSG_TEXT,
                'label' => '文本消息'
            ],
            [
                'id'    => self::MSG_IMAGE,
                'label' => '图片消息'
            ],
            [
                'id'    => self::MSG_LINK,
                'label' => '图文消息'
            ],
            [
                'id'    => self::MSG_MINIPROGRAM,
                'label' => '小程序消息'
            ]
        ];
    }
}
